<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
if(session.getAttribute("account") == null){
	response.sendRedirect("index.jsp");
}
%>
<!DOCTYPE html> 
<html><!-- InstanceBegin template="/Templates/indexLogin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>个人信息管理系统</title>

<link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
<script src="jquery-mobile/jquery-1.6.min.js"></script>
<script src="jquery-mobile/jquery.mobile-1.0.min.js"></script>

<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript">

</script>
<!-- InstanceEndEditable -->
</head> 
<body> 

<div data-role="page" id="page">
	<div data-role="header">

	<!-- InstanceBeginEditable name="header" -->
		<h1>任务列表</h1>
        <!-- InstanceEndEditable -->
        	<a href="logoff" data-role="button" class="ui-btn-right">
    注销
    </a>
           <div data-role="navbar">
        	<ul>
            <li><a href="dayAtAGlanceAction" id="main">一日行程</a></li>
            <li><a href="noteList" id="notes">便签</a></li>
            <li><a href="taskList" id="tasks">任务</a></li>
            <li><a href="contactList" id="contacts">联系</a></li>
            <li><a href="appointmentList" id="appointments">约会</a></li>
            </ul>
        </div>
	</div>
	<!-- InstanceBeginEditable name="content" -->
	<div data-role="content">	
	 
          <s:if test="%{!tasks.isEmpty()}">
            <ul data-inset="true" data-role="listview"
       data-split-icon="gear" data-split-theme="d" data-filter="true" dzhtata-filter-placeholder="搜索主题">
        <li data-role="list-divider">2012</li>
          <s:iterator value="tasks">
          <li>
		
	           <a href="m_controldialog.jsp?updateUrl=taskForware?operate=update&id=<s:property value="task_id"/>&deleteUrl=taskForware?operate=delete&target=task.task_id" data-rel="dialog">
               <h1>主题:
              <s:property value="subject" />
             </h1>
             <h1>内容</h1>
             <s:property value="comments" />
             <h1>状态</h1>
              <s:if test='%{task.status == "I"}'>
                   <p>草稿</p>
                  
                   </s:if>
                   <s:else>
                    
                    <p>完成</p>
                   </s:else>  
             
             <h1>优先级</h1>
                   <s:if test='%{priority == "N"}'>
                     	<p>正常</p>
                       
                   </s:if>
                   <s:elseif test='%{task.priority == "L"}'>
                   		
                     <p>低</p>
                   </s:elseif>
                   <s:else>
         	
                    <p>高</p>
                   </s:else>
             
             <h1>日期</h1>
             	<span><s:date name="due" format="yyyy-MM-dd"/></span>
               </a>
		  
            </li>
		  	</s:iterator>
		  </ul>
          
          	</s:if>
            
            
            
            
		  	<s:else>
		  	<p>您暂时还没有任务</p>
		  	</s:else>
		  
        	
	</div>
    <!-- InstanceEndEditable -->
	<!-- InstanceBeginEditable name="footer" -->
	<div data-role="footer" align="center">
		<a href="m_taskCreate.jsp" data-icon="plus" data-iconpos="top">新任务</a>
	</div>
    <!-- InstanceEndEditable -->
</div>
<!-- InstanceBeginEditable name="endLoad" -->

<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
